An application interface or user interface is the set of features an application provides so that a user may supply input to and receive output from the program. For this assignment, we are tasked to write an application that interfaces the user with an input or output device that we made.
In this assignment, I will be using Processing 4.0.1 which can downloaded from here After downloading, I will have to extract the zip file in order to open Processing.exe
Inside the website there are multiple tutorial for us to learn. Below is an example of a tutorial code.
This program creates a window that is 480 pixels wide and 120 pixels high, and then starts drawing white circles at the position of the mouse. When a mouse button is pressed, the circle color changes to black.
The second program we did was to code a led light up whenever the pushbutton is being pressed.
Arduino Code: The code is obtain from here
Serial.swap(1) was added to change the Txd & Rxd ports to the alternative serial ports
Led will light up when I press the push button
Using processing.exe to code when pushbutton pressed it will be red otherwise it will be green
Not Pressed | |
---|---|
Pressed |
Processing.exe Code: